package com.qingcheng.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.qingcheng.pojo.order.OrderItem;
import com.qingcheng.service.order.OrderItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author BaseJD
 */
@RestController
@RequestMapping("/orderItem")
public class OrderItemController {
    @Reference
    private OrderItemService orderItemService;

    @GetMapping("/findOrderItemById")
    public List<OrderItem> findOrderItemById(String orderId) {
        List<OrderItem> orderItems = orderItemService.findOrderItemById(orderId);
        return orderItems;
    }
}
